package com.lee.starter.response;

import lombok.Data;

import java.util.List;

/**
 * @author lee
 * @since 2019-11-22
 */
@Data
public class PageData {

    private PageMeta meta;

    private List<?> lists;

    public PageData(long page, long total, long size, List<?> lists) {
        this.meta = new PageMeta(page, total, size);
        this.lists = lists;
    }

    @Data
    private static class PageMeta {
        private long page;
        private long total;
        private long size;

        public PageMeta(long page, long total, long size) {
            this.page = page;
            this.total = total;
            this.size = size;
        }
    }
}


